/**
 * @projectName study-note
 * @package Flyweight
 * @className Flyweight.Test
 */
package Flyweight;

/**
 * Test
 * @description 测试类
 * @author answer_wx
 * @date 2022/7/6 14:57
 * @version 1.0
 */
public class Test {
    public static void main(String[] args) {
        WebsiteFactory websiteFactory = new WebsiteFactory();
        AbstractWebsite view = websiteFactory.getWebsiteName("展示");
        view.setUser(new User("小美"));

        AbstractWebsite view1 = websiteFactory.getWebsiteName("商品展示");
        view1.setUser(new User("小小丑"));

        AbstractWebsite view2 = websiteFactory.getWebsiteName("博客");
        view2.setUser(new User("小博"));
        AbstractWebsite view3 = websiteFactory.getWebsiteName("博客");
        view3.setUser(new User("小羊"));

        System.out.println(websiteFactory.countWebsite());
    }
}